import { IRouteComponentProps, Redirect } from 'umi'

export default function Layout({ children, location, route, history, match }: IRouteComponentProps) {
  console.log(location);
  if (location.pathname === '/') {
    return <Redirect from='/' to='/admin'></Redirect>
  } else {
    return children;
  }

}